/*
 * GameScene.fx
 *
 * Created on 03.12.2009, 12:03:27
 */

package org.zhgames.zhciv.client.gui.scenes;

import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.scene.layout.*;
import javafx.scene.text.*;
import javafx.scene.image.ImageView;
import javafx.scene.image.Image;
import javafx.stage.Alert;
import javafx.geometry.Rectangle2D;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.KeyCode;
import javafx.scene.control.Label;
import javafx.animation.*;
import java.lang.System;

/**
 * @author Vitaliy_Turilkin
 */

public class GameScene extends CustomNode{
    public-init var sceneMaster:SceneMaster;

    def gameMap:GameMap = GameMap{}
    def mainMenu:MainMenu = MainMenu{}

    override function create():Node {
         def group = Group{
             focusTraversable:true
             content:[
                     gameMap,
                     //mainMenu
                     //for(i in [0..1]){
                          // mainMenu
                     //}
                     
                     ]
             onKeyPressed: function( e: KeyEvent ):Void {
                if(e.code == KeyCode.VK_ESCAPE){
                    System.exit(0);
                }
             }
         };
         
         return group;
     }
}
